/** @jsxImportSource @emotion/react */
import * as React from "react";
import {
  Text,
  useTheme,
  Container,
  Button,
  SuffixInput,
  IconArrowRight,
  Select,
  InputDatalist, CheckSwitch,
  InputLine, LineColumn,
  CommitInput
} from "customize-easy-ui-component";
import { DialogEnterReturn } from "../../context/DialogEnterReturn";
//import queryString from "querystring";
import {useCommnBaseParm, CommnBase} from "./CommnBase";
import {监检形式} from "./起重";
import HashLinkObserver from "react-hash-link";

import queryString from "query-string";
export const 主结构形式=['夹套式','单层'];
export const 支座型式=['支承式','其他'];
export const 保温形式=['保温层','绝热层','真空夹套'];
//对于<select >如果不在预定义的列表中的 是无法显示的。
export const 安装形式=['立式','卧式'];
export const 加压方式=['其他'];
export const 罐车结构=['其他'];
export const 热处理方式=['其他'];
export const 端盖形式=['其他'];
export const 运行状态=['自用/生产/长期使用','其他'];
export const 安全状况等级=['1级','2级','3级','4级','5级'];   //"3 级"...
export const 危险介质分类=['第一组','第二组'];    //{给后端是数字的}危险介质分类 1 第一组 2 第二组：

//可嵌套的编辑器；传递保存变动数据。 中文可用，但是引用时刻会告警徐改成英文<As...>
interface 容器props {
  id?: string;
  readOnly?: boolean;
  editable?: boolean;
  //当前设备数据(确认修改之后)
  eqp?:any;
  //去修改设备数据
  mutationFunc: (...args: any[]) => any;
}
/**
 *压力容器的(非法定/委托)。
 * 剔除掉: 容器名称BOX_NAME：容器品种：容器类别：使用单位作业人员总数: ;
 * 设计规范有两个字段啊 DESIGN_LAW 替代 DESIGNCRITERION；
 * 容器图号VESSEL_PICNO：改为直接用公用的设计图号。
 * 除了电梯之外，其他种类的设备技术参数字段数监察平台都比检验平台要少：容器的在检验139个而在监察117个参数,很多字段实际上没数据||作废。
 * */
export const 容器: React.FunctionComponent<容器props> = ({
       readOnly,
       id,
       editable,
       eqp=null,
                                                       mutationFunc,
     }) =>
{
  //const qs= queryString.parse(window.location.search);
  const theme = useTheme();
  const {save}= window.history.state?.state??{};      //通用伪对话框传递格式
  const edt = save?  save : eqp;

  const [mont, setMont] = React.useState(edt.mont);
  const [insul, setInsul] = React.useState(edt.insul);
  const [vol, setVol] = React.useState(edt.vol);
  const [highs, setHighs] = React.useState(edt.highs);
  const [prs, setPrs] = React.useState(edt.prs);
  const [jakm, setJakm] = React.useState(edt.jakm);
  const [pnum, setPnum] = React.useState(edt.pnum);
  const [form, setForm] = React.useState(edt.form);
  const [weig, setWeig] = React.useState(edt.weig);
  const [rtlf, setRtlf] = React.useState(edt.rtlf);
  const [fulw, setFulw] = React.useState(edt.fulw);
  const [mdi, setMdi] = React.useState(edt.mdi);
 //TODO:常压容器 委托的 实际没有显示几个技术参数的！
  const  svp = edt?.svp;
  const [结构, set结构] = React.useState(svp?.结构);
  const [支座, set支座] = React.useState(svp?.支座);
  const [内径, set内径] = React.useState(svp?.内径);
  const [许工作压, set许工作压] = React.useState(svp?.许工作压);
  const [许工作温, set许工作温] = React.useState(svp?.许工作温);
  const [许工作介, set许工作介] = React.useState(svp?.许工作介);
  const [设计介, set设计介] = React.useState(svp?.设计介);
  const [壳设压, set壳设压] = React.useState(svp?.壳设压);
  const [壳设温, set壳设温] = React.useState(svp?.壳设温);
  const [壳介, set壳介] = React.useState(svp?.壳介);
  const [管设压, set管设压] = React.useState(svp?.管设压);
  const [管设温, set管设温] = React.useState(svp?.管设温);
  const [管介, set管介] = React.useState(svp?.管介);
  const [夹设压, set夹设压] = React.useState(svp?.夹设压);
  const [夹设温, set夹设温] = React.useState(svp?.夹设温);
  const [筒厚, set筒厚] = React.useState(svp?.筒厚);
  const [头厚, set头厚] = React.useState(svp?.头厚);
  const [衬厚, set衬厚] = React.useState(svp?.衬厚);
  const [夹厚, set夹厚] = React.useState(svp?.夹厚);
  const [人均容, set人均容] = React.useState(svp?.人均容);
  const [人均, set人均] = React.useState(svp?.人均);
  const [舱容限, set舱容限] = React.useState(svp?.舱容限);
  const [有保温, set有保温] = React.useState(svp?.有保温);
  const [舱设压, set舱设压] = React.useState(svp?.舱设压);
  const [加压式, set加压式] = React.useState(svp?.加压式);
  const [规格, set规格] = React.useState(svp?.规格);
  const [车空重, set车空重] = React.useState(svp?.车空重);
  const [罐材内, set罐材内] = React.useState(svp?.罐材内);
  const [罐材外, set罐材外] = React.useState(svp?.罐材外);
  const [罐材头, set罐材头] = React.useState(svp?.罐材头);
  const [罐设压, set罐设压] = React.useState(svp?.罐设压);
  const [罐设温, set罐设温] = React.useState(svp?.罐设温);
  const [底盘号, set底盘号] = React.useState(svp?.底盘号);
  const [罐厚筒, set罐厚筒] = React.useState(svp?.罐厚筒);
  const [罐厚头, set罐厚头] = React.useState(svp?.罐厚头);
  const [罐厚外筒, set罐厚外筒] = React.useState(svp?.罐厚外筒);
  const [罐厚外头, set罐厚外头] = React.useState(svp?.罐厚外头);
  const [底盘型, set底盘型] = React.useState(svp?.底盘型);
  const [时速, set时速] = React.useState(svp?.时速);
  const [时速弯, set时速弯] = React.useState(svp?.时速弯);
  const [罐容积, set罐容积] = React.useState(svp?.罐容积);
  const [人孔位, set人孔位] = React.useState(svp?.人孔位);
  const [罐外内径, set罐外内径] = React.useState(svp?.罐外内径);
  const [罐外壁厚, set罐外壁厚] = React.useState(svp?.罐外壁厚);
  const [盖厚, set盖厚] = React.useState(svp?.盖厚);
  const [罐外长, set罐外长] = React.useState(svp?.罐外长);
  const [盖材料, set盖材料] = React.useState(svp?.盖材料);
  const [盖形式, set盖形式] = React.useState(svp?.盖形式);
  const [筒料球, set筒料球] = React.useState(svp?.筒料球);
  const [壁厚, set壁厚] = React.useState(svp?.壁厚);
  const [设规范, set设规范] = React.useState(svp?.设规范);
  const [力类别, set力类别] = React.useState(svp?.力类别);
  const [封头型, set封头型] = React.useState(svp?.封头型);
  const [是快开, set是快开] = React.useState(svp?.是快开);
  const [监检式, set监检式] = React.useState(svp?.监检式);
  const [是换热, set是换热] = React.useState(svp?.是换热);
  const [制规范, set制规范] = React.useState(svp?.制规范);
  const  pa = edt?.pa;
  const [工作介, set工作介] = React.useState(pa?.工作介);
  const [充重, set充重] = React.useState(pa?.充重);         //.充重(Tool.castFloat(pms.getLoadweight()))
  const [充重量, set充重量] = React.useState(pa?.充重量);      //.充重量(Tool.castFloat(pms.getTinamplweig()))
  const [工作压, set工作压] = React.useState(pa?.工作压);
  const [工作温, set工作温] = React.useState(pa?.工作温);
  const [筒料, set筒料] = React.useState(pa?.筒料);
  const [封料, set封料] = React.useState(pa?.封料);
  const [衬料, set衬料] = React.useState(pa?.衬料);
  const [夹料, set夹料] = React.useState(pa?.夹料);
  const [壳用压, set壳用压] = React.useState(pa?.壳用压);
  const [壳高压, set壳高压] = React.useState(pa?.壳高压);
  const [壳用温, set壳用温] = React.useState(pa?.壳用温);
  const [管用压, set管用压] = React.useState(pa?.管用压);
  const [管高压, set管高压] = React.useState(pa?.管高压);
  const [管用温, set管用温] = React.useState(pa?.管用温);
  const [夹用压, set夹用压] = React.useState(pa?.夹用压);
  const [夹高压, set夹高压] = React.useState(pa?.夹高压);
  const [夹用温, set夹用温] = React.useState(pa?.夹用温);
  const [筒腐裕, set筒腐裕] = React.useState(pa?.筒腐裕);
  const [头腐裕, set头腐裕] = React.useState(pa?.头腐裕);
  const [壳体重, set壳体重] = React.useState(pa?.壳体重);
  const [内件重, set内件重] = React.useState(pa?.内件重);
  const [舱用压, set舱用压] = React.useState(pa?.舱用压);
  const [舱高压, set舱高压] = React.useState(pa?.舱高压);
  const [空调式, set空调式] = React.useState(pa?.空调式);
  const [照明, set照明] = React.useState(pa?.照明);
  const [测氧, set测氧] = React.useState(pa?.测氧);
  const [空调机, set空调机] = React.useState(pa?.空调机);
  const [表量程, set表量程] = React.useState(pa?.表量程);
  const [表精度, set表精度] = React.useState(pa?.表精度);
  const [医疗登记, set医疗登记] = React.useState(pa?.医疗登记);
  const [联合国号, set联合国号] = React.useState(pa?.联合国号);
  const [罐高压, set罐高压] = React.useState(pa?.罐高压);
  const [罐试压, set罐试压] = React.useState(pa?.罐试压);
  const [功率, set功率] = React.useState(pa?.功率);
  const [侧稳定角, set侧稳定角] = React.useState(pa?.侧稳定角);
  const [车形长, set车形长] = React.useState(pa?.车形长);
  const [车形宽, set车形宽] = React.useState(pa?.车形宽);
  const [车形高, set车形高] = React.useState(pa?.车形高);
  const [轴荷前, set轴荷前] = React.useState(pa?.轴荷前);
  const [轴荷后, set轴荷后] = React.useState(pa?.轴荷后);
  const [轴荷中, set轴荷中] = React.useState(pa?.轴荷中);
  const [充系数, set充系数] = React.useState(pa?.充系数);
  const [腐裕, set腐裕] = React.useState(pa?.腐裕);
  const [保温料, set保温料] = React.useState(pa?.保温料);
  const [热处, set热处] = React.useState(pa?.热处);
  const [耐试压, set耐试压] = React.useState(pa?.耐试压);
  const [气试压, set气试压] = React.useState(pa?.气试压);
  const [铭牌位, set铭牌位] = React.useState(pa?.铭牌位);
  const [罐色, set罐色] = React.useState(pa?.罐色);
  const [运行态, set运行态] = React.useState(pa?.运行态);
  const [安全, set安全] = React.useState(pa?.安全);
  const [装卸位, set装卸位] = React.useState(pa?.装卸位);
  const [装卸式, set装卸式] = React.useState(pa?.装卸式);
  const [危险介, set危险介] = React.useState(pa?.危险介);
  //肢解可复用的共同组件模式： Hook + 配套的组件。
  const cbp =useCommnBaseParm(eqp, svp, pa, save);
  //DeviceCommonInput没有对应参数 会报错json不会进入接口函数后端就报错Object null。
  async function confirmation() {
    const newdat={ ...eqp,  ...cbp.out,
      mont,insul,vol,jakm,pnum,prs,form,
      weig,rtlf,fulw,mdi,
      svp: { ...cbp.svpO,
        结构,支座,内径,许工作压,许工作温,许工作介,设计介,壳设压,壳设温,壳介,
        管设压,管设温,管介,夹设压,夹设温,筒厚,头厚,衬厚,夹厚,人均容,人均,
        舱容限,有保温,舱设压,加压式,规格,车空重,罐材内,罐材外,罐材头,罐设压,
        罐设温,底盘号,罐厚筒,罐厚头,罐厚外筒,罐厚外头,底盘型,时速,时速弯,
        罐容积,人孔位,罐外内径,罐外壁厚,盖厚,罐外长,盖材料,盖形式,筒料球,
        壁厚,设规范,力类别,封头型,是快开,监检式,是换热,制规范,
        }
      ,
      pa: { ...cbp.paO,
        工作介,充重,工作压,工作温,筒料,封料,衬料,夹料,壳用压,壳高压,壳用温,
        管用压,管高压,管用温,夹用压,夹高压,夹用温,筒腐裕,头腐裕,壳体重,
        内件重,舱用压,舱高压,空调式,照明,测氧,空调机,表量程,表精度,医疗登记,
        联合国号,罐高压,罐试压,功率,侧稳定角,车形长,车形宽,车形高,轴荷前,轴荷后,
        轴荷中,充系数,充重量,腐裕,保温料,热处,耐试压,气试压,铭牌位,罐色,运行态,
        安全,装卸位,装卸式,危险介,
        }

    };

    return newdat;
  }


  return (
    <div
      css={{
        [theme.mediaQueries.md]: {
          height: "auto",
          display: "block"
        }
      }}
    >
      <hr/>
      <Text
        css={{
          flex: 1,
          textAlign: "center",
          [theme.mediaQueries.md]: {
            textAlign: "left"
          }
        }}
        wrap={false}
        variant="h5"
        gutter={false}
      >
        {eqp.cod} 容器技术参数
      </Text>

      <div
        css={{
          flex: 1,
          [theme.mediaQueries.md]: {
            flex: "none"
          }
        }}
      >
        <div>
          <Container>
            <div
              css={{
                paddingTop: theme.spaces.lg,
                paddingBottom: theme.spaces.lg
              }}
            >

            <CommnBase cbp={cbp} id={id!}  confirmation={confirmation}/>
            <Text variant="h5">容器参数</Text>
            <LineColumn >
              <HashLinkObserver />
              <InputLine label={`主体结构形式(结构型式):`}>
                <InputDatalist value={ 结构 || ''} datalist={主结构形式}
                               onListChange={v => set结构(v ||undefined)} />
              </InputLine>
              <InputLine label={`安装形式(安装型式):`}>
                <Select inputSize="md"  value={ mont || ''}
                        onChange={e => setMont( e.currentTarget.value||undefined ) } >
                  <option></option>
                  { 安装形式.map((one,i) => (<option key={i}>{one}</option> )) } </Select>
              </InputLine>
              <InputLine label={`支座型式:`}>
                <InputDatalist value={ 支座 || ''} datalist={支座型式}
                               onListChange={v => set支座(v ||undefined)} />
              </InputLine>
              <InputLine label={`保温(绝热方式):`}>
    {/*         <Select inputSize="md"  value={ insul || ''}
                        onChange={e => setInsul( e.currentTarget.value||undefined ) } >
                  <option></option>
                  { 保温形式.map((one,i) => (<option key={i}>{one}</option> )) } </Select> */}
                <InputDatalist value={ insul || ''} datalist={保温形式}
                               onListChange={v => setInsul(v ||undefined)} />
              </InputLine>
              <InputLine label={`容积(换热面积):`}>
                <CommitInput id="vol" value={ vol || ''}  onSave={txt => setVol(txt||undefined) } />
              </InputLine>
              <InputLine label={`容积(换热面积)单位,是否换热面积:`}>
                <CheckSwitch checked={是换热 || false} onChange={e => set是换热(是换热? undefined:true)} />
              </InputLine>
              <InputLine label={`容器内径:`}>
                <SuffixInput  onSave={txt=> set内径(txt||undefined)}
                              value={ 内径 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`容器高(长):`}>
                <SuffixInput  onSave={txt=> setHighs(txt||undefined)}
                             value={ highs || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`充装重量:`}>
                <SuffixInput  onSave={txt=> set充重(txt||undefined)}
                              type="number"  value={ 充重 || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`工作压力:`}>
                <SuffixInput  onSave={txt=> set工作压(txt||undefined)}
                               value={ 工作压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`工作温度:`}>
                <SuffixInput  onSave={txt=> set工作温(txt||undefined)}
                               value={ 工作温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`工作介质:`}>
                <CommitInput  value={ 工作介 || ''}  onSave={txt => set工作介(txt||undefined) } />
              </InputLine>
              <InputLine label={`允许工作压力:`}>
                <SuffixInput  onSave={txt=> set许工作压(txt||undefined)}
                               value={ 许工作压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`允许工作温度:`}>
                <SuffixInput  onSave={txt=> set许工作温(txt||undefined)}
                              value={ 许工作温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`允许工作介质:`}>
                <CommitInput  value={ 许工作介 || ''}  onSave={txt => set许工作介(txt||undefined) } />
              </InputLine>
              <InputLine label={`设计压力:`}>
                <SuffixInput  id="prs"  onSave={txt=> setPrs(txt||undefined)}
                               value={ prs || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`设计介质:`}>
                <CommitInput  value={ 设计介 || ''}  onSave={txt => set设计介(txt||undefined) } />
              </InputLine>
              <InputLine label={`筒体材料:`}>
                <CommitInput  value={ 筒料 || ''}  onSave={txt => set筒料(txt||undefined) } />
              </InputLine>
              <InputLine label={`封头材料:`}>
                <CommitInput  value={ 封料 || ''}  onSave={txt => set封料(txt||undefined) } />
              </InputLine>
              <InputLine label={`(衬里)内衬材料:`}>
                <CommitInput  value={ 衬料 || ''}  onSave={txt => set衬料(txt||undefined) } />
              </InputLine>
              <InputLine label={`夹套材料:`}>
                <CommitInput  value={ 夹料 || ''}  onSave={txt => set夹料(txt||undefined) } />
              </InputLine>
              <InputLine label={`壳程设计压力:`}>
                <SuffixInput  onSave={txt=> set壳设压(txt||undefined)}
                              value={ 壳设压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`壳程使用工作压力:`}>
                <SuffixInput  onSave={txt=> set壳用压(txt||undefined)}
                              value={ 壳用压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`壳程最高压力:`}>
                <SuffixInput   onSave={txt=> set壳高压(txt||undefined)}
                              type="number"  value={ 壳高压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`内筒/壳程设计温度:`}>
                <SuffixInput  onSave={txt=> set壳设温(txt||undefined)}
                              value={ 壳设温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`壳程使用温度:`}>
                <SuffixInput  onSave={txt=> set壳用温(txt||undefined)}
                            value={ 壳用温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`壳程介质:`}>
                <CommitInput  value={ 壳介 || ''}  onSave={txt => set壳介(txt||undefined) } />
              </InputLine>
              <InputLine label={`管程设计压力:`}>
                <SuffixInput  onSave={txt=> set管设压(txt||undefined)}
                              type="number"  value={ 管设压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`管程使用工作压力:`}>
                <SuffixInput  onSave={txt=> set管用压(txt||undefined)}
                             value={ 管用压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`管程最高压力:`}>
                <SuffixInput  onSave={txt=> set管高压(txt||undefined)}
                              type="number"  value={ 管高压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`管程设计温度:`}>
                <SuffixInput  onSave={txt=> set管设温(txt||undefined)}
                             value={ 管设温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`管程使用温度:`}>
                <SuffixInput  onSave={txt=> set管用温(txt||undefined)}
                             value={ 管用温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`管程介质:`}>
                <CommitInput  value={ 管介 || ''}  onSave={txt => set管介(txt||undefined) } />
              </InputLine>
              <InputLine label={`夹套设计压力:`}>
                <SuffixInput  onSave={txt=> set夹设压(txt||undefined)}
                             value={ 夹设压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`夹套使用工作压力:`}>
                <SuffixInput  onSave={txt=> set夹用压(txt||undefined)}
                            value={ 夹用压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`夹套最高压力:`}>
                <SuffixInput  onSave={txt=> set夹高压(txt||undefined)}
                              type="number"  value={ 夹高压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`夹套设计温度:`}>
                <SuffixInput  onSave={txt=> set夹设温(txt||undefined)}
                             value={ 夹设温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`夹套使用温度:`}>
                <SuffixInput  onSave={txt=> set夹用温(txt||undefined)}
                             value={ 夹用温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`夹套介质:`}>
                <CommitInput  value={ jakm || ''}  onSave={txt => setJakm(txt||undefined) } />
              </InputLine>
              <InputLine label={`筒体(球罐）腐蚀裕度:`}>
                <CommitInput  value={ 筒腐裕 || ''}  onSave={txt => set筒腐裕(txt||undefined) } />
              </InputLine>
              <InputLine label={`封头腐蚀裕度:`}>
                <CommitInput  value={ 头腐裕 || ''}  onSave={txt => set头腐裕(txt||undefined) } />
              </InputLine>
              <InputLine label={`筒体厚度:`}>
                <SuffixInput  onSave={txt=> set筒厚(txt||undefined)}
                              value={ 筒厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`封头厚度:`}>
                <SuffixInput  onSave={txt=> set头厚(txt||undefined)}
                              value={ 头厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`(衬里)内衬厚度:`}>
                <SuffixInput  onSave={txt=> set衬厚(txt||undefined)}
                             value={ 衬厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`夹套厚度:`}>
                <SuffixInput   onSave={txt=> set夹厚(txt||undefined)}
                              value={ 夹厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`人均舱容:`}>
                <CommitInput  value={ 人均容 || ''}  onSave={txt => set人均容(txt||undefined) } />
              </InputLine>
              <InputLine label={`氧舱容限(人):`}>
                <CommitInput  value={ 舱容限 || ''}  onSave={txt => set舱容限(txt||undefined) } />
              </InputLine>
              <InputLine label={`氧舱人数(收费计算用):`}>
                <SuffixInput id="pnum2"  onSave={txt=> setPnum(txt||undefined)}
                              type="number"  value={ pnum || ''}>人</SuffixInput>
              </InputLine>
              <InputLine label={`人均舱容(立方米):`}>
                <SuffixInput   onSave={txt=> set人均(txt||undefined)}
                            value={ 人均 || ''}>立方米</SuffixInput>
              </InputLine>
              <InputLine label={`壳体重量:`}>
                <SuffixInput  onSave={txt=> set壳体重(txt||undefined)}
                              type="number"  value={ 壳体重 || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`内件重量:`}>
                <SuffixInput  onSave={txt=> set内件重(txt||undefined)}
                              type="number"  value={ 内件重 || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`有无保温绝热:`}>
                <CheckSwitch checked={有保温 || false} onChange={e => set有保温(有保温? undefined:true)} />
              </InputLine>
              <InputLine label={`舱体设计压力:`}>
                <SuffixInput  onSave={txt=> set舱设压(txt||undefined)}
                              type="number"  value={ 舱设压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`舱体最高工作压力:`}>
                <SuffixInput  onSave={txt=> set舱高压(txt||undefined)}
                              type="number"  value={ 舱高压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`舱体使用工作压力:`}>
                <SuffixInput  onSave={txt=> set舱用压(txt||undefined)}
                              type="number"  value={ 舱用压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`加压方式:`}>
                <InputDatalist value={ 加压式 || ''} datalist={加压方式}
                               onListChange={v => set加压式(v ||undefined)} />
              </InputLine>
              <InputLine label={`空调形式:`}>
                <CommitInput  value={ 空调式 || ''}  onSave={txt => set空调式(txt||undefined) } />
              </InputLine>
              <InputLine label={`氧舱照明(照明形式):`}>
                <CommitInput  value={ 照明 || ''}  onSave={txt => set照明(txt||undefined) } />
              </InputLine>
              <InputLine label={`氧舱测氧方式:`}>
                <CommitInput  value={ 测氧 || ''}  onSave={txt => set测氧(txt||undefined) } />
              </InputLine>
              <InputLine label={`氧舱空调电机:`}>
                <CommitInput  value={ 空调机 || ''}  onSave={txt => set空调机(txt||undefined) } />
              </InputLine>
              <InputLine label={`压力表量程:`}>
                <CommitInput  value={ 表量程 || ''}  onSave={txt => set表量程(txt||undefined) } />
              </InputLine>
              <InputLine label={`压力表精度:`}>
                <CommitInput  value={ 表精度 || ''}  onSave={txt => set表精度(txt||undefined) } />
              </InputLine>
              <InputLine label={`容器规格(氧舱规格):`}>
                <CommitInput  value={ 规格 || ''}  onSave={txt => set规格(txt||undefined) } />
              </InputLine>
              <InputLine label={`医疗机构登记号:`}>
                <CommitInput  value={ 医疗登记 || ''}  onSave={txt => set医疗登记(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐车空载重量:`}>
                <SuffixInput  onSave={txt=> set车空重(txt||undefined)}
                              type="number"  value={ 车空重 || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`罐车结构型式:`}>
                <InputDatalist value={ form || ''} datalist={罐车结构}
                               onListChange={v => setForm(v ||undefined)} />
              </InputLine>
              <InputLine label={`罐式集装箱联合国危险品编号:`}>
                <CommitInput  value={ 联合国号 || ''}  onSave={txt => set联合国号(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体材料(内筒):`}>
                <CommitInput  value={ 罐材内 || ''}  onSave={txt => set罐材内(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体材料(外筒):`}>
                <CommitInput  value={ 罐材外 || ''}  onSave={txt => set罐材外(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体材料(封头):`}>
                <CommitInput  value={ 罐材头 || ''}  onSave={txt => set罐材头(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体设计压力:`}>
                <SuffixInput  onSave={txt=> set罐设压(txt||undefined)}
                              type="number"  value={ 罐设压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`罐体最高工作压力:`}>
                <SuffixInput  onSave={txt=> set罐高压(txt||undefined)}
                              type="number"  value={ 罐高压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`罐体试验压力:`}>
                <SuffixInput onSave={txt=> set罐试压(txt||undefined)}
                              type="number"  value={ 罐试压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`罐体设计温度:`}>
                <SuffixInput  onSave={txt=> set罐设温(txt||undefined)}
                              type="number"  value={ 罐设温 || ''}>℃</SuffixInput>
              </InputLine>
              <InputLine label={`罐车底盘号码:`}>
                <CommitInput  value={ 底盘号 || ''}  onSave={txt => set底盘号(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体壁厚(筒体):`}>
                <SuffixInput  onSave={txt=> set罐厚筒(txt||undefined)}
                              type="number"  value={ 罐厚筒 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体壁厚(封头):`}>
                <SuffixInput  onSave={txt=> set罐厚头(txt||undefined)}
                              type="number"  value={ 罐厚头 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体壁厚(外筒体):`}>
                <SuffixInput  onSave={txt=> set罐厚外筒(txt||undefined)}
                            value={ 罐厚外筒 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体壁厚(外封头):`}>
                <SuffixInput  onSave={txt=> set罐厚外头(txt||undefined)}
                            value={ 罐厚外头 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`底盘型号:`}>
                <CommitInput  value={ 底盘型 || ''}  onSave={txt => set底盘型(txt||undefined) } />
              </InputLine>
              <InputLine label={`发动机功率:`}>
                <SuffixInput  onSave={txt=> set功率(txt||undefined)}
                              type="number"  value={ 功率 || ''}>千瓦</SuffixInput>
              </InputLine>
              <InputLine label={`罐车总重量:`}>
                <SuffixInput  onSave={txt=> setWeig(txt||undefined)}
                              type="number"  value={ weig || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`载重量:`}>
                <SuffixInput  onSave={txt=> setRtlf(txt||undefined)}
                              type="number"  value={ rtlf || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`满载总重量:`}>
                <SuffixInput  onSave={txt=> setFulw(txt||undefined)}
                              type="number"  value={ fulw || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`设计时速(平面路面):`}>
                <SuffixInput  onSave={txt=> set时速(txt||undefined)}
                              type="number"  value={ 时速 || ''}>km/h</SuffixInput>
              </InputLine>
              <InputLine label={`设计时速(转弯):`}>
                <SuffixInput  onSave={txt=> set时速弯(txt||undefined)}
                              type="number"  value={ 时速弯 || ''}>km/h</SuffixInput>
              </InputLine>
              <InputLine label={`空载最大侧向稳定角:`}>
                <CommitInput  value={ 侧稳定角 || ''}  onSave={txt => set侧稳定角(txt||undefined) } />
              </InputLine>
              <InputLine label={`整车外形尺寸(长度):`}>
                <SuffixInput  onSave={txt=> set车形长(txt||undefined)}
                              type="number"  value={ 车形长 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`整车外形尺寸(宽度):`}>
                <SuffixInput   onSave={txt=> set车形宽(txt||undefined)}
                              type="number"  value={ 车形宽 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`整车外形尺寸(高度):`}>
                <SuffixInput   onSave={txt=> set车形高(txt||undefined)}
                              type="number"  value={ 车形高 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`满载轴荷分配(前轴):`}>
                <SuffixInput   onSave={txt=> set轴荷前(txt||undefined)}
                               type="number"  value={ 轴荷前 || ''}>吨</SuffixInput>
              </InputLine>
              <InputLine label={`满载轴荷分配(后轴):`}>
                <SuffixInput   onSave={txt=> set轴荷后(txt||undefined)}
                               type="number"  value={ 轴荷后 || ''}>吨</SuffixInput>
              </InputLine>
              <InputLine label={`满载轴荷分配(中轴):`}>
                <SuffixInput   onSave={txt=> set轴荷中(txt||undefined)}
                               type="number"  value={ 轴荷中 || ''}>吨</SuffixInput>
              </InputLine>
              <InputLine label={`罐体容积:`}>
                <SuffixInput  onSave={txt=> set罐容积(txt||undefined)}
                              value={ 罐容积 || ''}>立方米</SuffixInput>
              </InputLine>
              <InputLine label={`充装介质:`}>
                <CommitInput  value={ mdi || ''}  onSave={txt => setMdi(txt||undefined) } />
              </InputLine>
              <InputLine label={`充装系数:`}>
                <CommitInput  value={ 充系数 || ''}  onSave={txt => set充系数(txt||undefined) } />
              </InputLine>
              <InputLine label={`(罐)充装重量:`}>
                <SuffixInput  onSave={txt=> set充重量(txt||undefined)}
                              type="number"  value={ 充重量 || ''}>kg</SuffixInput>
              </InputLine>
              <InputLine label={`腐蚀裕量:`}>
                <CommitInput  value={ 腐裕 || ''}  onSave={txt => set腐裕(txt||undefined) } />
              </InputLine>
              <InputLine label={`保温材料:`}>
                <CommitInput  value={ 保温料 || ''}  onSave={txt => set保温料(txt||undefined) } />
              </InputLine>
              <InputLine label={`热处理方式:`}>
                <InputDatalist value={ 热处 || ''} datalist={热处理方式}
                               onListChange={v => set热处(v ||undefined)} />
              </InputLine>
              <InputLine label={`耐压试验压力:`}>
                <SuffixInput  onSave={txt=> set耐试压(txt||undefined)}
                             type="number"  value={ 耐试压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`气密性试验压力:`}>
                <SuffixInput   onSave={txt=> set气试压(txt||undefined)}
                             value={ 气试压 || ''}>MPa</SuffixInput>
              </InputLine>
              <InputLine label={`人孔位置:`}>
                <CommitInput  value={ 人孔位 || ''}  onSave={txt => set人孔位(txt||undefined) } />
              </InputLine>
              <InputLine label={`铭牌位置:`}>
                <CommitInput  value={ 铭牌位 || ''}  onSave={txt => set铭牌位(txt||undefined) } />
              </InputLine>
              <InputLine label={`罐体外形尺寸(内径):`}>
                <SuffixInput   onSave={txt=> set罐外内径(txt||undefined)}
                              type="number"  value={ 罐外内径 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体外形尺寸(壁厚):`}>
                <SuffixInput  onSave={txt=> set罐外壁厚(txt||undefined)}
                              type="number"  value={ 罐外壁厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体外形尺寸(长度):`}>
                <SuffixInput  onSave={txt=> set罐外长(txt||undefined)}
                              type="number"  value={ 罐外长 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`罐体颜色:`}>
                <CommitInput  value={ 罐色 || ''}  onSave={txt => set罐色(txt||undefined) } />
              </InputLine>
              <InputLine label={`端盖主体厚度:`}>
                <SuffixInput   onSave={txt=> set盖厚(txt||undefined)}
                              type="number"  value={ 盖厚 || ''}>mm</SuffixInput>
              </InputLine>
              <InputLine label={`端盖主体材料:`}>
                <CommitInput  value={ 盖材料 || ''}  onSave={txt => set盖材料(txt||undefined) } />
              </InputLine>
              <InputLine label={`端盖形式:`}>
                <InputDatalist value={ 盖形式 || ''} datalist={端盖形式}
                               onListChange={v => set盖形式(v ||undefined)} />
              </InputLine>
              <InputLine label={`筒体材料(氧仓材料、球罐主体材质):`}>
                <CommitInput  value={ 筒料球 || ''}  onSave={txt => set筒料球(txt||undefined) } />
              </InputLine>
              <InputLine label={`运行状态:`}>
                <InputDatalist value={ 运行态 || ''} datalist={运行状态}
                               onListChange={v => set运行态(v ||undefined)} />
              </InputLine>
              <InputLine label={`公称壁厚:`}>
                <CommitInput  value={ 壁厚 || ''}  onSave={txt => set壁厚(txt||undefined) } />
              </InputLine>
              <InputLine label={`设计规范:`}>
                <CommitInput  value={ 设规范 || ''}  onSave={txt => set设规范(txt||undefined) } />
              </InputLine>
              <InputLine label={`安全状况等级(安全评定等级):`}>
                <InputDatalist value={ 安全 || ''} datalist={安全状况等级}
                               onListChange={v => set安全(v ||undefined)} />
        {/*        <Select inputSize="md"  value={ 安全 || ''}
                        onChange={e => set安全( e.currentTarget.value||undefined ) } >
                  <option></option>
                  { 安全状况等级.map((one,i) => (<option key={i}>{one}</option> )) } </Select> */}
              </InputLine>
              <InputLine label={`装卸组位置:`}>
                <CommitInput  value={ 装卸位 || ''}  onSave={txt => set装卸位(txt||undefined) } />
              </InputLine>
              <InputLine label={`介质装卸方式:`}>
                <CommitInput  value={ 装卸式 || ''}  onSave={txt => set装卸式(txt||undefined) } />
              </InputLine>
              <InputLine label={`压力类别:`}>
                <CommitInput  value={ 力类别 || ''}  onSave={txt => set力类别(txt||undefined) } />
              </InputLine>
              <InputLine label={`封头型式:`}>
                <CommitInput  value={ 封头型 || ''}  onSave={txt => set封头型(txt||undefined) } />
              </InputLine>
              <InputLine label={`是否快开门:`}>
                <CheckSwitch checked={是快开 || false} onChange={e => set是快开(是快开? undefined:true)} />
              </InputLine>
              <InputLine label={`监检形式:`}>
                <InputDatalist value={ 监检式 || ''} datalist={监检形式}
                               onListChange={v => set监检式(v ||undefined)} />
              </InputLine>
              <InputLine label={`危险介质分类:`}>
                <Select inputSize="md"  value={ 危险介 || ''}
                        onChange={e => set危险介( e.currentTarget.value||undefined ) } >
                  <option></option>
                  { 危险介质分类.map((one,i) => (<option key={i} value={i+1}>{one}</option> )) } </Select>
              </InputLine>
              <InputLine label={`制造规范:`}>
                <CommitInput  value={ 制规范 || ''}  onSave={txt => set制规范(txt||undefined) } />
              </InputLine>

            </LineColumn>

              <Text variant="h5">其它参数</Text>
              <Button size="lg" intent="primary"  iconAfter={<IconArrowRight />}
                      css={{ marginTop: theme.spaces.sm, whiteSpace:'unset' }}
                onPress={ async () => {
                  const eqpNew=await confirmation();
                  await mutationFunc(eqpNew);
                } }
              > 确认修改检查并保存到后端
              </Button>
            </div>
          </Container>
        </div>
      </div>

    </div>
  );
};

